package com.wit.witmg.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * @author bob
 * @since 2024-12-03
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value="TOrg对象", description="组织结构表")
public class TOrg implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private int id;

    @ApiModelProperty(value = "上级id")
    private Integer pid;

    @ApiModelProperty(value = "部门名称")
    private String na;

    @ApiModelProperty(value = "备注")
    private String remark;

    @ApiModelProperty(value = "创建时间")
    private Date date;

    private Integer tp;//类别（0-岗位，1-部门）tp为0（岗位）的不用查找下一级

    private transient List<THr> hrs=new ArrayList<>();//员工

    private transient List<TOrg> children;//子集
}
